import React,{PropTypes} from 'react'
import { IndexLink,Link } from 'react-router'
import { connect } from 'react-redux'
import RComponent from '../../components'
import discoverStyle from './discover.scss'
import {setTitle} from '../../actions/page'

class Discover extends RComponent{
    constructor(props, context){
        super(props,context)
    }

    componentWillMount(){
        // 设置页面头部
        this.props.dispatch(setTitle({title:'page2',showHome:true,showShare:true}))
    }

    //跳转
	goAssetsReport(){
        this.context.router.push('assetsReport');
	}

	//跳转
	goBalance(){
        // console.log(JSON.stringify(this.context))
		this.context.router.push('balance');
	}

	//跳转
	goWhitepaper(){
        this.context.router.push('whitepaper');
	}

    render(){
        return (
        	<div id="main_container">
	            <div className="find-top">
					<ul>
						<li>
                            <Link to="/assetsReport">
    							<div className="find-top-pic-A"></div>
    							<p>report</p>
                            </Link>
						</li>
						<li onClick={this.goBalance.bind(this)}>
							<div className="find-top-pic-B"></div>
							<p>balance</p>

							<div className="find-unmber"></div>
						</li>
						<li onClick={this.goWhitepaper.bind(this)}>
							<div className="find-top-pic-C"></div>
							<p>history</p>

						</li>
					</ul>
				</div>
				<div className="find-list" >
					<div className="find-list-title">
						<p className="find-white_paper"><span className="white_paper-pic"></span>white paper</p>
						<p className="find-more" onClick={this.goWhitepaper}>more<span className="find-more-pic"></span></p>
					</div>
					<div className="find-list-tex all-list">
					</div>
				</div>
			</div>
        )
    }
}
Discover.propTypes = {

}
export default connect(
    state => ({
        loading:state.page.loading
    })
)(Discover)
